﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace FootBallMatchProject.Piography.Client
{
    public partial class CoachInfoForm : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            DataClassLayer.Coach coach = new DataClassLayer.Coach();
            DataClassLayer.CoachCollection coaches = new DataClassLayer.CoachCollection();
            if (Request.QueryString["ID"] != null &&
                Request.QueryString["ID"].ToString() != "")
            {
                coach.ID = int.Parse(Request.QueryString["ID"].ToString());
            }
            else
            {
                coach.ID = 1;
            }
            DataTable table = coaches.FillList(coach);
            if (table.Rows.Count == 1)
            {
                CoachView.DataSource = table;
                CoachView.DataBind();
            }
        }
    }
}